﻿@{
    Layout = null;
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>@Html.PageTitle()</title>
        <link href="@Url.Content("~/Themes/Default/Content/Styles/theme.css")" type="text/css" rel="Stylesheet" />
        <link href="@Url.Content("~/Areas/Admin/Content/admin_main.css")" type="text/css" rel="Stylesheet" />
        <link href="@Url.Content("~/Areas/Admin/Content/jquery-ui-1.8.6.custom.css")" type="text/css" rel="Stylesheet" />
    	<link href="@Url.ThemeContent("~/Images/favicon.png")" rel="icon"/> 

        <script type="text/javascript" src="@Url.Content("~/Areas/Admin/Content/jquery-1.4.2.min.js")"></script>     
        <script type="text/javascript" src="@Url.Content("~/Areas/Admin/Content/jquery-ui-1.8.6.custom.min.js")"></script>     
     	<script language="javascript" type="text/javascript" src="@Url.Content("~/Themes/Default/Content/Scripts/jquery.markitup.pack.js")"></script>
        <script language="javascript" type="text/javascript" src="@Url.Content("~/Themes/Default/Content/Scripts/html-set.js")"></script>
        <script language="javascript" type="text/javascript" src="@Url.Content("~/Themes/Default/Content/Scripts/bbcode-set.js")"></script>
        <script language="javascript" type="text/javascript" src="@Url.Content("~/Themes/Default/Content/Scripts/colorpicker.js")"></script>
        
    	<script type="text/javascript">

    	    $(document).ready(function () {
    	        $('#tabs').tabs();

    	        $('input#Color').ColorPicker({
    	            color: $(this).val(),
    	            onShow: function (colpkr) {
    	                $(colpkr).fadeIn(100);
    	                return false;
    	            },
    	            onHide: function (colpkr) {
    	                $(colpkr).fadeOut(100);
    	                return false;
    	            },
    	            onChange: function (hsb, hex, rgb) {
    	                $('input#Color').val('#' + hex);
    	                $('label#colorPickerPreview').css('color', '#' + hex);
    	            },
    	            onSubmit: function (hsb, hex, rgb, el) {
    	                $(el).val(hex);
    	                $(el).ColorPickerHide();
    	            },
    	            onBeforeShow: function () {
    	                $(this).ColorPickerSetColor(this.value);
    	            }
    	        });

    	        $("img.smileyimg").click(function () {
    	            insertAtCaret("Text", $(this).attr("alt"));
    	        });

    	        $("#select_all").click(function () {
    	            $checkall = $("#select_all");
    	            if ($checkall.attr('checked')) {
    	                $("." + $checkall.attr("class")).attr('checked', true);
    	            } else {
    	                $("." + $checkall.attr("class")).attr('checked', false);
    	            }
    	        });

    	        $("textarea.html").markItUp(htmlSettings);
    	    });


    	    function insertAtCaret(areaId, text) {
    	        var txtarea = document.getElementById(areaId);
    	        var scrollPos = txtarea.scrollTop;
    	        var strPos = 0;
    	        var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ?
    		        "ff" : (document.selection ? "ie" : false));
    	        if (br == "ie") {
    	            txtarea.focus();
    	            var range = document.selection.createRange();
    	            range.moveStart('character', -txtarea.value.length);
    	            strPos = range.text.length;
    	        }
    	        else if (br == "ff") strPos = txtarea.selectionStart;

    	        var front = (txtarea.value).substring(0, strPos);
    	        var back = (txtarea.value).substring(strPos, txtarea.value.length);
    	        txtarea.value = front + text + back;
    	        strPos = strPos + text.length;
    	        if (br == "ie") {
    	            txtarea.focus();
    	            var range = document.selection.createRange();
    	            range.moveStart('character', -txtarea.value.length);
    	            range.moveStart('character', strPos);
    	            range.moveEnd('character', 0);
    	            range.select();
    	        }
    	        else if (br == "ff") {
    	            txtarea.selectionStart = strPos;
    	            txtarea.selectionEnd = strPos;
    	            txtarea.focus();
    	        }
    	        txtarea.scrollTop = scrollPos;
    	    }
        </script>
        @RenderSection("HeadContent", false)
    </head>

    <body>
        <div id="wrap">
            <div id="header">
                <div id="logo">
                    <img src="@Url.ThemeContent("Images/logo.png")" alt="" />
                </div>

                <ul class="horizontal menu">
                    <li>@Html.ActionLink("Board", "Index", "Board", new { area = "" }, new { @class = "board_index" })</li>
                    <li>
                        <a href="@Url.Action("Logout", "Auth", new { area = "" })" class="logout">Logout</a>
                    </li>
                </ul>
            </div>   

            @Html.GetMessages()

            <div id="admin_menu">
                <ul class="vertical menu">
                    <li>
                        @Html.ControllerAwareActionLink("Summary", "Index", "Admin", new { @class = "summary" })
                    </li>
                    <li>
                        <hr />
                    </li>
                    <li class="title">
                        <span>Board</span>
                    </li>
                    <li>
                        <ul class="sub_menu">
                            <li>@Html.ControllerAwareActionLink("Configurations", "Config", "Configs", new { @class = "configuration" })</li>
                            <li>@Html.ControllerAwareActionLink("Forums", "Forums", "Forums", new { @class = "forums" })</li>
                            <li>@Html.ControllerAwareActionLink("Themes", "Themes","Themes", new { @class = "themes" })</li>
                            <li>@Html.ControllerAwareActionLink("Upgrade", "Upgrade","Upgrade", new { @class = "upgrade" })</li>
                        </ul>
                    </li>

                    <li class="title">
                        <span>Membership</span>
                    </li>
                    <li>
                        <ul class="sub_menu">
                            <li>@Html.ControllerAwareActionLink("Ranks", "Ranks","Ranks", new { @class = "ranks" })</li>
                            <li>@Html.ControllerAwareActionLink("Roles", "Roles","Roles", new { @class = "roles" })</li>                    
                            <li>@Html.ControllerAwareActionLink("Users", "Users", "Users", new { @class = "users" })</li>
                        </ul>
                    </li>


                    <li class="title">
                        <span>Posting</span>
                    </li>
                    <li>
                        <ul class="sub_menu">
                            <li>@Html.ControllerAwareActionLink("BB Codes", "BBCodes","BBCodes", new { @class = "bb_codes" })</li>
                            <li>@Html.ControllerAwareActionLink("File Types", "FileTypes","FileTypes", new { @class = "file_types" })</li>
                            <li>@Html.ControllerAwareActionLink("Reported Posts", "ReportedPosts","Admin", new { @class = "reported_posts" })</li>
                            <li>@Html.ControllerAwareActionLink("Smilies", "Smilies","Smilies", new { @class = "smilies" })</li>
                        </ul>
                    </li>

                    <li class="title">
                        <span>Plugins</span>
                    </li>
                    <li>
                        <ul class="sub_menu">
                            <li>@Html.ControllerAwareActionLink("Plugins", "Index","Plugins", new { @class = "plugins" })</li>
                            <li>@Html.ControllerAwareActionLink("Plugin Configs", "PluginConfig", "Configs", new { @class = "plugin_configurations" })</li>
                        </ul>
                    </li>
                </ul>
                 
                @Html.Partial("~/Areas/Admin/Views/Shared/_PluginMenu.cshtml", mesoBoard.Web.Menus.PluginsAdminCP())
            </div>
                 
            <div id="admin_content">
                @RenderBody()
            </div>

            <div id="footer">
                &copy; @DateTime.UtcNow.Year mesoBoard - All Rights Reserved
                <br />
                Powered by <a href="http://mesoboard.com">mesoBoard</a> 
                version @HttpContext.Current.Cache["mesoBoardVersion"]
            </div>
        </div>
    </body>
</html>
